<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2"/>
    <title>用户: ${this.user.fullName}</title></head>

<body>

<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>用户：${this.user.fullName}</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <g:link action="index" controller="user">用户列表</g:link>
                    </li>
                    <li class="breadcrumb-item"><a href="#!">用户：${this.user.fullName}</a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">

            <!-- Hover table card start -->
            <div class="card">
                <div class="card-header">
                    <h5>用户：${this.user.fullName}</h5>

                    <div class="card-header-right">
                        <g:link action="edit" resource="${this.user}" data-toggle="tooltip" data-placement="top"
                                title="" data-original-title="编辑">
                            <i class="icofont icofont-edit"></i>
                        </g:link>

                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block">
                    <div class="form-group row">

                        <div class="col-md-1"><strong>${this.user.city?.name}</strong></div>

                        <div class="col-md-1"><strong>${this.user.department?.name}</strong></div>

                        <div class="col-md-1"><strong>${this.user.position?.name}</strong></div>

                        <div class="col-md-1"><strong class="cellphoneFormat">${this.user.cellphone}</strong></div>

                        <div class="col-md-1"><strong>${this.user?.externalId}</strong></div>
                        <div class="col-md-1"><strong>启用：${this.user?.enabled ? '是' : '否'}</strong></div>

                        <div class="col-md-1"><strong>账户过期：${this.user?.accountExpired ? '是' : '否'}</strong></div>

                        <div class="col-md-1"><strong>账户锁定：${this.user?.accountLocked ? '是' : '否'}</strong></div>

                        <div class="col-md-1"><strong>密码过期：${this.user?.passwordExpired ? '是' : '否'}</strong></div>

                        <div class="col-md-1"><strong>短信登录：${this.user?.loginBySms ? '是' : '否'}</strong></div>

                        <div class="col-md-1"><strong>固定ip：${this.user?.fixedIp ? '是' : '否'}</strong></div>

                     %{--   <label class="col-md-2 col-form-label">用户名称</label>

                        <div class="col-md-3">
                            <span class="cont">${this.user.fullName}</span>
                        </div>--}%

                    </div>

                </div>

            </div>

            <div class="card">
                <div class="card-header">
                    <h5>用户角色</h5>

                    <div class="card-header-right">
                        <g:link action="create" controller="userRole" id="${this.user.id}"
                                data-toggle="tooltip"
                                data-placement="top" title=""
                                data-original-title="增加授权"><i class="icofont icofont-plus"></i></g:link>


                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block dt-responsive">

                    <div class="table-responsive">
                        <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">
                            <div class="table-responsive">
                                <table class="table table-striped table-hover">
                                    <tbody>
                                    <g:each in="${userRoleList}" var="r">
                                        <tr>
                                            <td>${r?.role.description}</td>
                                            <td width="6%">
                                                <sec:ifAllGranted roles="ROLE_ADMINISTRATOR">
                                                    <g:link action="deleteRole" params="[userId: r.user.id, roleId: r.role.id]"
                                                            class="btn btn-danger btn-mini">取消授权</g:link>
                                                </sec:ifAllGranted>
                                            </td>
                                        </tr>
                                    </g:each>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <!-- Hover table card end -->
        </div>

        <!-- Page-body end -->

    </div>
</div>

</body>

</html>












%{--<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <title>用户: ${this.user.fullName}</title>
</head>

<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>Next CRM</li>
                    <li><g:link controller="user" action="index">用户管理</g:link></li>
                    <li class="active">
                        <span>${this.user.fullName}</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                用户: ${this.user.fullName}
            </h2>
          
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <div class="hpanel hred contact-panel">
            <div class="panel-heading">
                    <div class="panel-tools">
                        <g:link class="btn btn-info btn-xs" action="edit"
                                resource="${this.user}"><i class="fa fa-edit"></i>编辑</g:link>
                    </div>
                用户基本信息
            </div>

            <div class="panel-body">
                <div class="text-muted font-bold m-b-xs ol-md-6">
                    <div class="col-md-12"><h4><a href=>${this.user.fullName}</a></h4></div>

                    <div class="col-md-1"><strong>${this.user.city?.name}</strong></div>

                    <div class="col-md-1"><strong>${this.user.department?.name}</strong></div>

                    <div class="col-md-1"><strong>${this.user.position?.name}</strong></div>

                    <div class="col-md-1"><strong class="cellphoneFormat">${this.user.cellphone}</strong></div>

                    <div class="col-md-1"><strong>${this.user?.externalId}</strong></div>
                    <div class="col-md-1"><strong>启用：${this.user?.enabled}</strong></div>

                    <div class="col-md-1"><strong>账户过期：${this.user?.accountExpired}</strong></div>

                    <div class="col-md-1"><strong>账户锁定：${this.user?.accountLocked}</strong></div>

                    <div class="col-md-1"><strong>密码过期：${this.user?.passwordExpired}</strong></div>

                    <div class="col-md-1"><strong>短信登录：${this.user?.loginBySms}</strong></div>

                    <div class="col-md-1"><strong>固定ip：${this.user?.fixedIp}</strong></div>

                </div>
            </div>

            <div class="panel-footer contact-footer">
                <div class="row">
                    <div class="col-md-4 border-right">
                        <div class="contact-stat"><span>经理人数量:</span> <strong>${com.next.Contact.countByUser(this.user)}</strong>
                        </div>
                    </div>


                    <div class="col-md-4">
                        <div class="contact-stat"><span>成交金额:</span> <strong>0</strong></div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="hpanel  hblue">
            <div class="panel-heading">
                <div class="panel-tools">
                        <g:link controller="userRole" action="create" id="${this.user.id}"
                                class="btn btn-info btn-xs">增加授权</g:link>
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                用户角色
            </div>

            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-hover">
                        <tbody>
                        <g:each in="${userRoleList}" var="r">
                            <tr>
                                <td>${r?.role.description}</td>
                                <td width="6%">
                                    <sec:ifAllGranted roles="ROLE_ADMINISTRATOR">
                                        <g:link action="deleteRole" params="[userId: r.user.id, roleId: r.role.id]"
                                                class="btn btn-danger btn-block btn-xs btn-block">取消授权</g:link>
                                    </sec:ifAllGranted>
                                </td>
                            </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>

    </div>

</div>
</body>
</html>--}%
